package com.gdqy.FCS.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.gdqy.FCS.dao.FabricComponentDao;
import com.gdqy.FCS.entity.FabricComponent;

@Service
@Transactional
public class FabricComponentService {
	@Autowired
	private FabricComponentDao fabricComponentDao;


	public List<FabricComponent> selectAll(){
		return fabricComponentDao.selectAll();
	}	
	
	public FabricComponent selectById(int id){
		return fabricComponentDao.selectById(id);
	}
	
	public List<FabricComponent> selectClass(String parent_code){
		return fabricComponentDao.selectClass(parent_code);
	}
	
	public FabricComponent selectByCode(String code){
		return fabricComponentDao.selectByCode(code);
	}
	
	public int insert(FabricComponent fabricComponent) {
		return fabricComponentDao.insert(fabricComponent);
	}
}
